package com.tian.mall;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.SimpleFormatter;

/**
 * @author zhumengping
 * @title: DateUtils
 * @projectName zhump-cloud
 * @date 2023/8/2 16:32
 */
public class DateUtils {


    static final String DATEYYYYMMDDHHMMSS = "yyyy-MM-dd HH:mm:ss";


    /**
    * <pre>
     *     date()  to string
    * </pre>
    * @param date
    * @return java.lang.String
    * @author zhump
    * @date 2023/8/2 16:43
    */
    public static String getDateFromString(Date date){
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATEYYYYMMDDHHMMSS);
        return simpleDateFormat.format(date);
    }
}
